/*
 * @Descripttion: 
 * @version: 
 * @Author: ChenXiang
 * @Date: 2021-05-12 22:46:36
 * @LastEditors: ChenXiang
 * @LastEditTime: 2021-08-22 15:17:11
 */

import React from "./module/sourceCode/pages/react/index.js";
import ReactDOM from "./module/sourceCode/pages/react/react.dom.js";
import Component from "./module/sourceCode/pages/react/Component"

class ClassComponent extends Component {
  static defaultProps = {
    color: 'red'
  }
  // constructor(props) {
  //   super(props);
  //   this.state = {}
  // }
  render() {
    return <div>Component-{this.props.name}
      color:{this.props.color}

    </div>
  }
}

function FunctionComponents(props) {
  return (<div>123</div>)
}

const jsx = (
  <div>
    <p>全餐</p>
    <a href="www.baidu.com">就都啊</a>
    <ClassComponent name="cx" />
    <FunctionComponents name='age' />
    <>
      fff
    </>

    {
      [1, 2].map(item => (
        <React.Fragment>数组：{item}</React.Fragment>
      ))
    }
  </div>
)

ReactDOM.render(jsx, document.getElementById("root"))